home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / UTILITY1 / IPXSPX.ZIP / SOURCE / DIRSERV / SERVERFO.TXT < prev   
Text File  |  1993-12-20  |  2KB  |  82 lines

  1. Sub aboutButton_Click ()
  2.     AboutForm.Show 1
  3. End Sub
  4.  
  5. Sub Form_Load ()
  6.  
  7.     spx1.LinkType = 2
  8.  
  9. End Sub
  10.  
  11. Sub FormatInternetAddress (inString)
  12.     Dim nwString, outString As String
  13.     Dim index As Integer
  14.  
  15.     'Pretty printing for the hexidecimal network and node addresses
  16.     outString = "["
  17.     nwString = Mid$(inString, 1, 4)
  18.     For index = 1 To Len(nwString)
  19.        outString = outString & Format$(Hex$(Asc(Mid$(nwString, index, 1))), "00")
  20.     Next index
  21.  
  22.     outString = outString & "]["
  23.     nwString = Mid$(inString, 5, 6)
  24.     For index = 1 To Len(nwString)
  25.     outString = outString & Format$(Hex$(Asc(Mid$(nwString, index, 1))), "00")
  26.     Next index
  27.  
  28.     outString = outString & "]"
  29.  
  30.     inString = outString
  31. End Sub
  32.  
  33. Sub okButton_Click ()
  34.     
  35.     End
  36.  
  37. End Sub
  38.  
  39. Sub ServerMenuFileExit_Click ()
  40.     End
  41. End Sub
  42.  
  43. Sub spx1_LinkEvent ()
  44.     Dim address As String
  45.  
  46.     If spx1.Event Then
  47.     MsgBox "Error Link: " & spx1.Event
  48.     End If
  49.  
  50.     If spx1.Status = 0 Then
  51.     address = spx1.ReceivedFrom
  52.     FormatInternetAddress address
  53.     remoteList.AddItem address & " has disconnected"
  54.     End If
  55.  
  56. End Sub
  57.  
  58. Sub spx1_ReceiveData ()
  59.     Dim address As String
  60.  
  61.     If spx1.Received = "DIR" Then
  62.     id = spx1.Connection
  63.     address = spx1.ReceivedFrom
  64.     FormatInternetAddress address
  65.     remoteList.AddItem address & " has connected"
  66.     spx1.RemoteName = spx1.ReceivedFrom
  67.     spx1.Send = Dir$("*.*")
  68.     End If
  69.  
  70. End Sub
  71.  
  72. Sub spx1_SendData ()
  73.  
  74.     newFile = Dir$
  75.  
  76.     If newFile <> "" Then
  77.      spx1.Send = newFile
  78.     End If
  79.  
  80. End Sub
  81.  
  82.